using AliFox.BaseService.BaseData;
using AliFox.BaseService.Systems;
using Microsoft.EntityFrameworkCore;
using Volo.Abp.AuditLogging.EntityFrameworkCore;
using Volo.Abp.BackgroundJobs.EntityFrameworkCore;
using Volo.Abp.BlobStoring.Database.EntityFrameworkCore;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.Modeling;
using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.Identity;
using Volo.Abp.Identity.EntityFrameworkCore;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
using Volo.Abp.OpenIddict.EntityFrameworkCore;
using Volo.Abp.TenantManagement;
using Volo.Abp.TenantManagement.EntityFrameworkCore;

namespace AliFox.BaseService.EntityFrameworkCore;

[ConnectionStringName("Default")]
public class BaseServiceDbContext : AbpDbContext<BaseServiceDbContext>
{

    #region Entities from the modules

    public DbSet<DataDictionary> DataDictionaries { get; set; }

    public DbSet<DataDictionaryDetail> DataDictionaryDetails { get; set; }

    public DbSet<Organization> GetOrganizations { get; set; }

    public DbSet<Job> Jobs { get; set; }

    public DbSet<UserJob> UserJobs { get; set; }

    public DbSet<UserOrganization> UserOrganizations { get; set; }

    public DbSet<Menu> Menus { get; set; }

    public DbSet<RoleMenu> RoleMenus { get; set; }

    #endregion

    public BaseServiceDbContext(DbContextOptions<BaseServiceDbContext> options)
        : base(options)
    {
    }

    protected override void OnModelCreating(ModelBuilder builder)
    {
        base.OnModelCreating(builder);

        builder.ConfigureBaseService();
    }
}